package com.cq.hd.admin.controller;

import com.cq.hd.admin.annotation.RequiresPermissionsDesc;
import com.cq.hd.common.pagination.Page;
import com.cq.hd.common.response.Result;
import com.cq.hd.member.api.TbCommissionBillApi;
import com.cq.hd.member.api.dto.AdminCommissionBillDto;
import com.cq.hd.member.api.vo.AdminCommissionBillPageVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/commissionBill")
@Api(tags = "经纪人佣金账户明细相关接口")
public class TbCommissionBillController {

    @Autowired
    private TbCommissionBillApi commissionBillApi;

    @ApiOperation(value = "佣金资金流水")
    @RequiresPermissions("finance:commissionBill:list")
    @RequiresPermissionsDesc(menu = {"财务管理", "经纪人佣金账户明细"}, button = "查询")
    @GetMapping("/page")
    public Result<Page<AdminCommissionBillPageVo>> page(AdminCommissionBillDto adminCommissionBillDto) {
        return commissionBillApi.pageCommissionBill(adminCommissionBillDto);
    }

}
